package cn.tedu.micro.demo.rabbitmq.ampq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class ProducerRepository <T>{
    @Autowired
    private RabbitTemplate rabbitTemplate;
    public void send(T message,String destination){
        rabbitTemplate.convertAndSend(destination,message);
    }
}
